<template>
	<view>
		<view style="height: 20rpx"></view>
		<u-tabbar :value="value" placeholder safeAreaInsetBottom fixed>
			<u-tabbar-item text="首页" icon="home" @click="chlickTabbar" :name="0"></u-tabbar-item>
			<u-tabbar-item text="我的" icon="account" @click="chlickTabbar" :name="1"></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
export default {
	name: 'workTabbar',
	props: {
		value: {
			type: Number,
			default: 0
		}
	},
	data() {
		return {};
	},
	methods:{
		chlickTabbar(e){
			if(e == this.value){
				return
			}
			if(e === 0){
				uni.navigateTo({
					url:'/pages/shop/index/index'
				})
			}else{
				uni.navigateTo({
					url:'/pages/shop/my/my'
				})
			}
		}
	}
};
</script>

<style lang="scss"></style>
